package xiaolong.lian.dto;

import xiaolong.lian.entity.Doc;
import xiaolong.lian.entity.Page;

import java.util.List;

public class DocPages {
    private Doc doc;
    private List<Page> pages;

    public DocPages(Doc doc, List<Page> pages) {
        this.doc = doc;
        this.pages = pages;
    }

    public Doc getDoc() {
        return doc;
    }

    public void setDoc(Doc doc) {
        this.doc = doc;
    }

    public List<Page> getPages() {
        return pages;
    }

    public void setPages(List<Page> pages) {
        this.pages = pages;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"doc\":")
                .append(doc);
        sb.append(",\"pages\":")
                .append(pages);
        sb.append('}');
        return sb.toString();
    }
}
